package o;

import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import androidx.annotation.Nullable;
import o.beo.f;
import o.bhi.b;

public class bhk extends fai implements OnClickListener, bfa {
    private Context ˊ;
    private Class<? extends bgz> ˋ;
    private Bundle ˎ;
    private View ˏ;
    private View ॱ;
    private TextView ᐝ;

    public bhk(Context context) {
        this.ˎ = null;
        this.ˊ = context;
        this.ˋ = Type1ListSegment.class;
    }

    public bhk() {
        this.ˎ = null;
        this.ˊ = ContentManager.getInstant().getContext();
        this.ˋ = Type1ListSegment.class;
    }

    public void ˋ(@Nullable Bundle bundle) {
        super.ˋ(bundle);
        this.ˎ = bundle;
    }

    public View ˏ() {
        if (this.ˊ == null) {
            Logger.e("CardListWindow", "onCreateView, context == null");
            return null;
        }
        this.ˏ = LayoutInflater.from(this.ˊ).inflate(beo$j.ॱˋ, null);
        this.ॱ = this.ˏ.findViewById(beo$e.ʻ);
        this.ᐝ = (TextView) this.ˏ.findViewById(beo$e.ˑॱ);
        if (this.ˎ != null) {
            CharSequence string = this.ˎ.getString("ARG_TITLE");
            if (Logger.ˎ()) {
                Logger.ˏ("CardListWindow", "title is :" + string);
            }
            if (TextUtils.isEmpty(string)) {
                this.ᐝ.setText(f.ꜞ);
            } else {
                this.ᐝ.setText(string);
            }
        }
        this.ॱ.setOnClickListener(this);
        deu ˎ = new b(this.ˊ).ˊ(this.ˎ).ˏ().ˎ(this.ˋ);
        ᐝ().ˎ(beo$e.ˉॱ, ˎ, null);
        if (ˎ instanceof Type1ListSegment) {
            ((Type1ListSegment) ˎ).ˊ(this);
        }
        return this.ˏ;
    }

    public View ˊ(int i) {
        if (this.ˏ == null) {
            return null;
        }
        return this.ˏ.findViewById(i);
    }

    public void onClick(View view) {
        if (view.getId() == beo$e.ʻ) {
            fam.ॱ().ˋ(this.ˊ, this);
        }
    }

    public void ˏ(String str) {
        if (!TextUtils.isEmpty(str) && this.ᐝ != null) {
            this.ᐝ.setText(str);
        }
    }
}
